﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ctrNews.ascx.cs" Inherits="PM.Admin.ctrUser.ctrNews" %>
<%@Register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagPrefix="FCKeditorV2" %>
<script src="../../Scripts/ckfinder/ckfinder.js" type="text/javascript"></script>

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div class="detail box">
<div class="bottom_box_content box">
<div class="head_box_content box">
<div class="ct"><p>Danh sách tin</p></div>
<div class="search">
<asp:TextBox ID="txtSearch" runat="server" CssClass="input_se input_box"></asp:TextBox>
<asp:Button ID="btbSearch" runat="server" Text="Tìm kiếm" 
        CssClass="button_box btn_se" onclick="btbSearch_Click"/>
</div> 
<div class="clear"></div>
</div><!--head_box_content box-->

    
<asp:GridView ID="GridView1" runat="server" CellPadding="4" 
DataKeyNames="id" 
EmptyDataText="không có dữ liệu" 
AllowPaging="True"
PageSize="5"
AutoGenerateColumns="False" 
Width="100%" onpageindexchanging="GridView1_PageIndexChanging" 
onrowdatabound="GridView1_RowDataBound" onrowdeleting="GridView1_RowDeleting" 
onrowcommand="GridView1_RowCommand"
EnableTheming="True" ShowHeaderWhenEmpty="True" >
<RowStyle BackColor="#F3F3F3"></RowStyle>
<AlternatingRowStyle BackColor="white"></AlternatingRowStyle>
<EditRowStyle BackColor="#D9EEA2"></EditRowStyle>
<SelectedRowStyle BackColor="#D9EEA2"></SelectedRowStyle>
<Columns>
<asp:TemplateField HeaderText="STT">
<ItemTemplate>
<%#Container.DataItemIndex+1 %>
</ItemTemplate>
<ItemStyle Width="20px"></ItemStyle>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
    <ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>

<asp:BoundField DataField="Name" HeaderText="Tên tin" />

<asp:TemplateField  HeaderText="Ngày đăng">
<ItemTemplate>
    <asp:Label ID="Label1" runat="server" Text='<%#Eval("Date") %>'>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
 <ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemStyle Width="100px"></ItemStyle>
</asp:TemplateField>

<asp:TemplateField  HeaderText="Hình ảnh">
<ItemTemplate>
    <asp:Image runat="server" ImageUrl='<%#Eval("Image")%>' Height="100px" Width="100px"/>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
    <ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>

<asp:TemplateField HeaderText="Hiển thị">
<ItemTemplate>
    <asp:Label ID="Label7" runat="server" Text='<%#Common.PageHelper.ShowActiveStatus(DataBinder.Eval(Container,"DataItem.Active").ToString()) %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle Width="50px"></ItemStyle>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
    <ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>

<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" CommandArgument='<%# Eval("Id") %>' CommandName="select" runat="server">Chọn</asp:LinkButton>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
    <ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
         
<asp:CommandField ShowDeleteButton="True" DeleteText="Xóa">
    <ItemStyle Width="20px"></ItemStyle>
    <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
    <ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:CommandField>           
           
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox ID="cbAll" runat="server" OnCheckedChanged="ChkAll" AutoPostBack="True"/>
</HeaderTemplate>
<ItemTemplate >
<asp:CheckBox ID="cbitem" runat="server"/>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle Width="50px"></ItemStyle>
<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>
    <ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>

</Columns> 

</asp:GridView><!--end GridView-->

  

</div><!--end bottom_box_content box-->
<div class="mtnv">
    <asp:LinkButton ID="LinkButton1" runat="server" CssClass="btn_mtd" 
        onclick="LinkButton1_Click">Xóa</asp:LinkButton>
    <asp:LinkButton ID="btnRefresh" runat="server" CssClass="btn_mtd" onclick="LinkButton2_Click" >Làm mới</asp:LinkButton>
</div><!--end mtnv-->
</div><!--end detail box-->
<div id="hr_"></div>
<fieldset >
        <legend>Thao tác dữ liệu</legend>
        <div style="width: 700px;">
        <p>
            <asp:Label ID="lblname" runat="server">Nhóm tin:</asp:Label>
            <asp:DropDownList ID="ddlGroupNews" runat="server" CssClass="ddl_box ddl_ttdb">
            </asp:DropDownList>        
        </p>
        <p>
            <asp:Label ID="Label1" runat="server">Tiêu đề:</asp:Label>
            <asp:TextBox ID="txtName" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>               
        </p>
        <p>
            <asp:Label ID="Label2" runat="server">Hình ảnh:</asp:Label>
            <asp:TextBox ID="txtImage" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>
            <input type="button" onclick="BrowseServer('<% =txtImage.ClientID %>','images');" value="Browse Server" class="inputFCK_box"/>            
        </p>
        <p>
            <asp:Label ID="Label3" runat="server">Video:</asp:Label>
            <asp:TextBox ID="txtFile" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>  
            <input type="button" onclick="BrowseServer('<% =txtFile.ClientID %>','files');" value="Browse Server" class="inputFCK_box"/>                         
        </p>
        <p>
            <asp:Label ID="Label4" runat="server">Mô tả:</asp:Label>
            <asp:TextBox ID="txtContent" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>               
        </p>
           <p>
            <asp:Label ID="Label8" runat="server">Nội dung:</asp:Label>
            <FCKeditorV2:FCKeditor ID="fckDetail" runat="server" ></FCKeditorV2:FCKeditor>
           <p>
               </p>
               <p>
                   <asp:Label ID="Label9" runat="server">Ngày đăng:</asp:Label>
                   <asp:TextBox ID="txtDate" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>
               </p>
               <p>
                   <asp:Label ID="Label10" runat="server">Title meta:</asp:Label>
                   <asp:TextBox ID="txtTitle" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>
               </p>
               <p>
                   <asp:Label ID="Label11" runat="server">Description meta:</asp:Label>
                   <asp:TextBox ID="txtDescription" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>
               </p>
               <p>
                   <asp:Label ID="Label12" runat="server">Keyword:</asp:Label>
                   <asp:TextBox ID="txtKeyword" runat="server" CssClass="input_box box_ttdb"></asp:TextBox>
               </p>
               <p>
                   <asp:Label ID="Label5" runat="server">Tin ưu tiên:</asp:Label>
                   <div style="margin:-35px 0px 0px 183px;">
                       <asp:CheckBox ID="cboPriority" runat="server" CssClass="box_ttdb" />
                   </div>
                   
                   <p>
                   </p>
                   <p>
                       <asp:Label ID="Label14" runat="server">Tin trang chủ:</asp:Label>
                       <div style="margin:-35px 0px 0px 183px;">
                           <asp:CheckBox ID="cboIndex" runat="server" CssClass="box_ttdb" />
                       </div>
                       <p>
                       </p>
                       <p>
                           <asp:Label ID="Label13" runat="server">Tin mới slide:</asp:Label>
                           <div style="margin:-35px 0px 0px 183px;">
                               <asp:CheckBox ID="cboSlide" runat="server" CssClass="box_ttdb" />
                           </div>
                           <p>
                           </p>
                           <p>
                               <asp:Label ID="Label16" runat="server">Sự kiện nổi bật:</asp:Label>
                               <div style="margin:-35px 0px 0px 183px;">
                                   <asp:CheckBox ID="cbo1" runat="server" CssClass="box_ttdb" />
                               </div>
                               <p>
                               </p>
                               <p>
                                   <asp:Label ID="Label15" runat="server">Sức khỏe:</asp:Label>
                                   <div style="margin:-35px 0px 0px 183px;">
                                       <asp:CheckBox ID="cbo2" runat="server" CssClass="box_ttdb" />
                                   </div>
                                   <p>
                                   </p>
                                   <p>
                                       <asp:Label ID="Label17" runat="server">Hoạt động nổi bật:</asp:Label>
                                       <div style="margin:-35px 0px 0px 183px;">
                                           <asp:CheckBox ID="cbo3" runat="server" CssClass="box_ttdb" />
                                       </div>
                                       <asp:CheckBox ID="cbo4" runat="server" Visible="False" />
                                       <asp:CheckBox ID="cbo5" runat="server" Visible="False" />
                                       <asp:CheckBox ID="cbo6" runat="server" Visible="False" />
                                       <asp:CheckBox ID="cboOrder" runat="server" Visible="False" />
                                       <p>
                                       </p>
                                       <p>
                                           <asp:Label ID="Label6" runat="server">Kích hoạt:</asp:Label>
                                           <div style="margin:-35px 0px 0px 183px;">
                                               <asp:CheckBox ID="cbActive" runat="server" CssClass="box_ttdb" />
                                           </div>
                                           <p>
                                           </p>
                                           <p>
                                           </p>
                                           <p>
                                           </p>
                                           <p>
                                           </p>
                                           <p>
                                           </p>
                                           <p>
                                           </p>
                                           <p>
                                           </p>
                                           <p>
                                           </p>
                                       </p>
                                   </p>
                               </p>
                           </p>
                       </p>
                   </p>
                   
                </p>
                
                          
            </div>
    </fieldset>
   
         <p>
             <asp:Button ID="btnSave" runat="server" Text="Lưu lại" CssClass="button_box" 
                 onclick="btnSave_Click"/>
             <asp:Button ID="Button3" runat="server" Text="Reset" CssClass="button_box" 
                 onclick="Button3_Click"/>
        </p>
</ContentTemplate>
</asp:UpdatePanel>